// 项目的JS入口文件
// console.log('ok')
import Vue from 'vue'
//导入APP跟目录
import app from './App.vue'

//导入MUI
import './lib/css/mui.min.css'
//导入字体图标扩展
import './lib/css/icons-extra.css'
//按需导入需要的组件
import { Header,Swipe, SwipeItem} from 'mint-ui'
Vue.component(Header.name,Header)
//home组件的轮播图组件
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);

//1.1导入路由模块
import VueRouter from 'vue-router'
//1.2安装路由
Vue.use(VueRouter)

//导入格式化的时间插件
import moment from 'moment'
//定义全局过滤器
Vue.filter('dataFormat',function(data,pattern = "YYYY-MM-DD HH:mm:ss"){
    return moment(data).format(pattern)
})
//导入vue-resource
import VueResource from 'vue-resource'
//安装vue-resource
Vue.use(VueResource )
//1.3导入路由模块
import router from './router.js'
//创建vm实例
var vm = new Vue({
   el:"#app",
   data:{},
   render: c => c(app),
   //1.4将路由挂载到vm实例中
   router
})
